// pages/my/my.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    token: wx.getStorageSync('token')
  },
  onShow() {
    let token = wx.getStorageSync('token')
    if (!token) {
      wx.navigateTo({
        url: '/pages/login/login',
      })
    }
  },
  // 退出登录
  exitClick() {
  wx.clearStorageSync()
    wx.navigateTo({
      url: '/pages/login/login',
    })
  }
})